<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->systemName;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>

<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jQselect.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
</head>

<body>
	<div id="main">
		<div id="topMenu">
			<div id="navigation">当前位置：软件包列表</div>
		  <div id="topOtherMenu"></div>
	  </div>
		<div id="body">
			<div id="search"></div>
	  <div id="content">
      <!-- 应有软件地址 -->
      				<div style="display:none;">
<?php foreach($this->rows as $row):?>
					<div class="colorbox" id="sourceAppShould<?php echo $row['id'];?>">
						<div class="subject">
							<div class="title">渠道应用软件包ID为“<?php echo $row['id']?>”的应有的测试地址</div>
							<div class="close" onClick="$(document).colorbox.close();">&nbsp;</div>
						</div>
						<div class="content">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td >路径规范: 产品编号/操作系统编号/推广Id+推广子Id.扩展名</td>
								</tr>
								<tr>
									<td>测试地址: <br /> <?php echo $row['should_test_url'];?> </td>
								</tr>
						</table>
						</div>
					</div>
<?php endforeach;?>
				</div>
      <!-- 应有软件地址 -->

      
				<form id="listForm" name="listForm" method="post" action="">
					<table class="table">
						<tr class="subject">                        
						  <td>状态</td>
						  <td>应有的测试地址</td>
							<td>Source Id</td>
							<td>Sub Source Id</td>
						  <td class="checkBoxTd">下载地址</td>
						</tr>
                        <?php if(count($this->rows)):?>
                        <?php foreach($this->rows as $row):?>
						<tr class="dataLine">
                        
							<td 
                            <?php if($row['status']=="4"):?>
                            	title="<?php echo htmlspecialchars($row['testNotes']);?>"
                            <?php endif;?>
                            >
                            <?php if($row['status']=="1"):?>
                            	待上传
                            <?php endif;?> 					    						 
							<?php if($row['status']=="2"):?>
                            	 已上传待测试
                            <?php endif;?>  
                             <?php if($row['status']=="3"):?>
                            	测试通过审核
                            <?php endif;?> 
                             <?php if($row['status']=="4"):?>
                            	测试未通过审核	
                            <?php endif;?> 
                          
					   </td>
							<td><a href="javascript:void(0);" onclick="$(document).ready(function(){$.fn.colorbox({inline:true, href:'#sourceAppShould<?php echo $key;?>'});});">查看</a></td>
							<td><?php echo $row['sourceId'];?></td>
							<td><?php echo $row['sourceSubId'];?></td>
						  <td class="checkBoxTd"><?php if($row['test_url']):?>
                            <a href="<?php  echo 'http://'.$this->configs['project']['ftp']['baseUrl'].$row['test_url'];?>" target="_blank">下载</a>
                            <?php else:?>
                           
                            <?php endif;?>
                            
                            <?php if($row['path']):?>
                              <a href="<?php echo 'http://'.$this->configs['project']['ftp']['baseUrl'] . $row['path'];?>" target="_blank">
                            下载                            </a>
                            <?php else:?>
                           
                            <?php endif;?>                          </td>
						</tr>
                        <?php endforeach;?>
                        <?php else:?>
                        <tr><td>暂无通过测试的软件包</td></tr>
                        <?php endif;?>
					</table>
<table class="controlTable">
					  <tr>
							<td align="left">&nbsp;</td>
						<td colspan="6" class="paginator"><div align="right"><?php echo $this->pageString;?></div></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
</div>
<script language="javascript">
function moveFile()
{
	if (confirm('确定移动选中的测试软件包到成品目录吗？')) {
		$("#listForm").attr('action', '<?php echo $this->projectUrl(array('action'=>'move-mul-test-app','backAction'=>$this->backAction)) ;?>');
		$("#listForm").submit();
		return true;
	} else {
		return false;
	}
}
function updateStatus()
{
	if (confirm('确定批量修改选中的软件包的状态吗？')) {
		$("#listForm").attr('action', '<?php echo $this->projectUrl(array('action'=>'update-mul-status','backAction'=>$this->backAction,'memberSourceApplyId'=>$this->memberSourceApplyId)) ;?>');
		$("#listForm").submit();
		return true;
	} else {
		return false;
	}
}
</script>
</body>
</html>